Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/remove user/soft removal #1691

Conversation

OhMaley
Copy link
Collaborator

@OhMaley OhMaley commented Dec 4, 2024

A brief description of the purpose of the changes contained in this PR.

This implement a full process to allow user's to remove their account automatically.
It includes:

  • A new 'account view'
  • A 'deletion account' section in it
  • A delete confirmation pop-up with some verification
  • An email confirmation message with a deletion link
  • An email with a summary and details about the removed user
  • The deletion of the user's personal attribute (or its anonymization)
  • An email to the removed user to confirm its removal
  • A modification on the login mechanism to not allow removed user's credentials

Issues this PR resolves

#1159

A checklist for hand testing

  • Create a new user
  • Complete its profile with as much information as possible
  • Create an organization
  • Create a competition
  • Create a Queue
  • Add a submission
  • Make the competition and the submission public
  • Log out and log in with another user
  • Take a look at the new user profile
  • Log out and log in with the new user's account
  • Delete the account using the account view
  • Check your email (or the message in the console)
  • Click on the given link
  • Check that admins received an email with information on the user's deletion
  • Check the the deleted user's got a confirmation email
  • Try to log in with the deleted user's account. And fail
  • Log in as another user
  • Check that the competition and submissions of the removed user are still here but without personal data
  • Take a look at the removed user's profile and check that no personal information is displayed

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer

@Didayolo
Copy link
Member

Didayolo commented Dec 12, 2024

Question: is deleting from Django admin the same than deleting from "Account" drop down button?
(not very important anyway)

@Didayolo Didayolo linked an issue Dec 12, 2024 that may be closed by this pull request
@OhMaley
Copy link
Collaborator Author

OhMaley commented Dec 12, 2024

Question: is deleting from Django admin the same than deleting from "Account" drop down button? (not very important anyway)

No. Removing the Django admin only remove / anonymize the user personal data. It is only one of the step involved in the whole process. But note that is does not remove the user completly, it soft removes it.

Also I'll do some changes to include the email sent to the admins and the confirmation email sent to the user for all cases.

@Didayolo Didayolo self-assigned this Dec 17, 2024
@Didayolo
Copy link
Member

@OhMaley

Also I'll do some changes to include the email sent to the admins and the confirmation email sent to the user for all cases.

Should I wait for a commit from you before reviewing this PR then? Or is it already ready?

@OhMaley
Copy link
Collaborator Author

OhMaley commented Dec 17, 2024

@OhMaley

Also I'll do some changes to include the email sent to the admins and the confirmation email sent to the user for all cases.

Should I wait for a commit from you before reviewing this PR then? Or is it already ready?

Yes, wait for my modifications You will be able to review this PR after my next push

@OhMaley OhMaley force-pushed the feature/remove-user/soft-removal branch from 58c70ad to ef95a38 Compare December 18, 2024 20:20
@Didayolo Didayolo mentioned this pull request Dec 23, 2024
2 tasks
@Didayolo Didayolo changed the base branch from develop to feature/remove-user/soft-removal December 23, 2024 12:17
@Didayolo Didayolo merged commit 4936054 into codalab:feature/remove-user/soft-removal Dec 23, 2024
Didayolo added a commit that referenced this pull request Dec 23, 2024
* add soft deletions attributes in profile class + override deletion method + update email and log in mechanism

* add emails template + soft delete + account view + deletion confirmation view

* move the notice emails in the delete method of user

* filter deleted users out of the front page stat

* disable the action buttons on the list of participants modal in the competition management view

Co-authored-by: Tristan Mary <[email protected]>
@OhMaley OhMaley mentioned this pull request Dec 26, 2024
26 tasks
@ObadaS ObadaS mentioned this pull request Jan 9, 2025
26 tasks
Didayolo added a commit that referenced this pull request Jan 16, 2025
* Update version.json for release 1.15.0 (#1712)

* Merge develop into master (#1405)

* organization oidc login added

* unused test file removed

* http client

* some changes

* oidc login and signup added

* oidc flow completed

* Prevent LimitOverrunError with large output lines

If a submission writes a output line larger than the stream buffer
size ( default 64k ) a LimitOverrunError will be raise. Rather than
using readline(...) use readutil(....) and in the case of a overrun
just return the current buffer, the rest of the line will be returned
with the next read.

Signed-off-by: Chris Harris <[email protected]>

* terms and condition check added

* one terms checkbox for all organization login buttons

* removed sandbox property from iframe to allow links in the iframe

* Detailed results title removed

* Detailed results configuration (#1374)

* competition model updated

* competition settings to allow participant to make submission public/private

* unwanted restriction removed

* detailed results now shown in submission panel and in leaderboard

* submission tests updated

---------

Signed-off-by: Chris Harris <[email protected]>
Co-authored-by: Ihsan Ullah <[email protected]>
Co-authored-by: Chris Harris <[email protected]>

* Revert "Merge develop into master (#1405)"

This reverts commit a26fc36.

* More general exception in views.py (#1512)

* More general exception in views.py

* Update views.py

* Update version.json for release 1.15.0

---------

Signed-off-by: Chris Harris <[email protected]>
Co-authored-by: Adrien Pavão <[email protected]>
Co-authored-by: Ihsan Ullah <[email protected]>
Co-authored-by: Ihsan Ullah <[email protected]>
Co-authored-by: Benjamin Bearce <[email protected]>
Co-authored-by: Chris Harris <[email protected]>
Co-authored-by: Nicolas Homberg <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>

* Feature/remove user/soft removal (#1691) (#1716)

* add soft deletions attributes in profile class + override deletion method + update email and log in mechanism

* add emails template + soft delete + account view + deletion confirmation view

* move the notice emails in the delete method of user

* filter deleted users out of the front page stat

* disable the action buttons on the list of participants modal in the competition management view

Co-authored-by: Tristan Mary <[email protected]>

* Updated the filters to show the new "Is Deleted" (#1717)

* Updated the filters to show the new "Is Deleted"

* Flake8 fixes

---------

Co-authored-by: Obada Haddad <[email protected]>

* .gitingore update to ignore the home page counters file. Also removed the file from cache so that it's not tracked anymore

* Fix/remove user/soft removal (#1724)

* Set is_active to False when deleting a user

* change the email sending method and populate the missing txt files

* add a checkbox to show/hide deleted users in the list of participant modal

* Fixed the wrong user being named in the greetings in the email sent to admins upon account deletion

* Flake8 fixed

* restricted the usage of deletion link more than one time, used a different deletion token to expire it after deletion, account deletion modal now disappears after clickin the delete my account button

---------

Co-authored-by: OhMaley <[email protected]>
Co-authored-by: Obada Haddad <[email protected]>
Co-authored-by: Ihsan Ullah <[email protected]>

* Fix URLs in user deletion email (#1729)

* Fix URLs in user deletion email

* Fix domain

---------

Signed-off-by: Chris Harris <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ihsan Ullah <[email protected]>
Co-authored-by: Ihsan Ullah <[email protected]>
Co-authored-by: Benjamin Bearce <[email protected]>
Co-authored-by: Chris Harris <[email protected]>
Co-authored-by: Nicolas Homberg <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Tristan Mary <[email protected]>
Co-authored-by: Obada Haddad-Soussac <[email protected]>
Co-authored-by: Obada Haddad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove users
2 participants